<template>
	<view class="qualityMoney">
		<view class="qualityMoney-main">
			<view class="qualityMoney-main-li1">
				<text class="qualityMoney-main-li1-txt">质保押金额(元)</text>
			</view>
			<view class="qualityMoney-main-li2">
				<text class="qualityMoney-main-li2-txt">{{factoryMoney}}</text>
			</view>
			<view class="qualityMoney-main-li3">
				<text class="qualityMoney-main-li3-txt font_blod" @click="cli_look">查看</text>
			</view>
		</view>
		<view class="qualityMoney-remark">
			<view class="qualityMoney-remark-title font_blod">
				说明:
			</view>
			<view class="qualityMoney-remark-con">
				合作到期，按照合作最后批次产品的质保时间到期后，退还质保押金。
			</view>
		</view>
	</view>
</template>

<script>
	import allapi from '../api/index.js'
	export default {
		data() {
			return {
				factoryId: uni.getStorageSync('id_factory'),
				factoryMoney: ''
			}
		},
		onShow() {
			// 获取厂家质保押金明细
			this.getFactoryMoneyDetails()
		},
		methods: {
			cli_look () {
				uni.navigateTo({
					url: '/pages/manufacturers/qualityMoneyDetails/qualityMoneyDetails'
				})
			},
			// 获取厂家质保押金明细
			getFactoryMoneyDetails () {
				uni.request({
					url: allapi.getFactoryMoneyDetails,
					data: {
						factoryId: this.factoryId,
						classify: 1
					},
					success: (res) => {
						console.log(res);
						let dat = res.data.data
						this.factoryMoney = dat.factoryMoney
					}
				})
			}
		}
	}
</script>

<style scoped>
	.qualityMoney {
		position: absolute;
		width: 100%;
		height: 100%;
		left: 0;
		top: 0;
		background-image: url('https://www.zzzsyh.com/applets/agent/factory/13.png');
		background-size: 100%;
		background-repeat: no-repeat;
	}
	.qualityMoney-main {
		background-image: url('https://www.zzzsyh.com/applets/agent/factory/12.png');
		background-repeat: no-repeat;
		background-size: 100%;
		height: 640rpx;
		width: 686rpx;
		margin: 0 auto;
		margin-top: 156rpx;
	}
	.qualityMoney-remark {
		color: #666666;
		font-size: 28rpx;
		margin: 30rpx;
		height: 168rpx;
		background: #EEEEEE;
		border-radius: 32rpx;
		padding: 32rpx;
	}
	.qualityMoney-remark-con {
		margin-top: 32rpx;
	}
	.qualityMoney-main {
		padding-top: 0.1rpx;
	}
	.qualityMoney-main-li1 {
		text-align: center;
		margin-top: 84rpx;
	}
	.qualityMoney-main-li2 {		
		font-size: 84rpx;
		font-weight: 800;
		color: #874001;
		line-height: 114rpx;
		margin-top: 36rpx;
		display: flex;
		justify-content: center;
	}
	.qualityMoney-main-li3 {
		margin-top: 186rpx;
		display: flex;
		justify-content: center;
	}
	.qualityMoney-main-li3-txt {
		display: block;
		width: 456rpx;
		height: 108rpx;
		line-height: 108rpx;
		text-align: center;
		background: #FFFFFF;
		box-shadow: 0rpx 8rpx 12rpx 0rpx #E69C3C;
		border-radius: 54rpx;
		font-size: 36rpx;
		color: #734E2B;
	}
</style>
